package com.example.kemgdemo.excepiton;

import com.example.kemgdemo.enums.ExceptionEnum;
import lombok.Getter;
import lombok.Setter;

/**
 * 学号：1401030048
 * Created by 梁嘉伟 on 2019/7/11
 */
public class BaseException extends RuntimeException {

    @Getter
    @Setter
    private Integer code;

    public BaseException(ExceptionEnum exceptionEnum){
        super(exceptionEnum.getMessage());
        this.code = exceptionEnum.getCode();
    }
}
